<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/message_list/q_message_list.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/message_list/q_message_list.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '消息列表',
                name: 'message_list/q_message_list',
                url: "/q_message_list/",
                sortName: "Date"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"Title":"","Read":"","Recipient":"","Date":""});
            const searchFormOptions = ref([[{"title":"标题","field":"Title","type":"like"},{"dataKey":"是否已读","data":[],"title":"是否已读","field":"Read","type":"select"},{"title":"接受人员","field":"Recipient","type":"like"},{"title":"时间","field":"Date","type":"datetime"}]]);
            const columns = ref([{field:'ID',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Title',title:'标题',type:'string',width:220,align:'left',sort:true},
                       {field:'Content',title:'内容',type:'string',width:220,align:'left'},
                       {field:'Read',title:'是否已读',type:'int',bind:{ key:'是否已读',data:[]},width:110,align:'left'},
                       {field:'Recipient',title:'接受人员',type:'string',width:120,align:'left'},
                       {field:'Date',title:'时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
